<style lang='scss' type='stylesheet/scss' scoped>
.as-dropdown{
  margin-bottom: 10px;
}
</style>
<template>
  <div>
    <as-h2>triggler</as-h2>
    <as-card :text="text"
             title="设置 triggler 可以切换触发方式，click 点击触发 / hover 悬浮触发，默认为 hover 触发">
      <as-dropdown triggler="click">
        <span>下拉菜单 <i class="el-icon-arrow-down"></i></span>
        <as-dropdown-menu slot="dropdown">
          <as-dropdown-item>看电影</as-dropdown-item>
          <as-dropdown-item>吃火锅</as-dropdown-item>
        </as-dropdown-menu>
      </as-dropdown>
      <as-dropdown triggler="hover" style="margin-left:20px">
        <span>下拉菜单 <i class="el-icon-arrow-down"></i></span>
        <as-dropdown-menu slot="dropdown">
          <as-dropdown-item>看电影</as-dropdown-item>
          <as-dropdown-item>吃火锅</as-dropdown-item>
        </as-dropdown-menu>
      </as-dropdown>
    </as-card>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapGetters } from "vuex";
export default {
  name: "",
  computed: {
    ...mapGetters(["isMobile"])
  },
  data() {
    return {
      text: `<template>
   <div>
     <as-dropdown triggler="click">
       <span>下拉菜单 <i class="el-icon-arrow-down"></i></span>
       <as-dropdown-menu slot="dropdown">
         <as-dropdown-item>看电影</as-dropdown-item>
         <as-dropdown-item>吃火锅</as-dropdown-item>
       </as-dropdown-menu>
     </as-dropdown>
     <as-dropdown triggler="hover" style="margin-left:20px">
       <span>下拉菜单 <i class="el-icon-arrow-down"></i></span>
       <as-dropdown-menu slot="dropdown">
         <as-dropdown-item>看电影</as-dropdown-item>
         <as-dropdown-item>吃火锅</as-dropdown-item>
       </as-dropdown-menu>
     </as-dropdown>
   </div>
 </template>`
    };
  }
};
</script>
